package com.jhgsys.internal.incentive.service;

import com.jhgsys.internal.common.exception.FebsException;
import com.jhgsys.internal.incentive.dto.IncentiveRewardApplyDto;
import com.jhgsys.internal.incentive.entity.IncentiveGoodsOrder;
import com.jhgsys.internal.incentive.entity.IncentiveRewardApply;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.system.entity.User;

import java.util.List;

/**
 * 安全奖励申请 Service接口
 *
 * @author wanghjw
 * @date 2024-09-03 14:08:36
 */
public interface IIncentiveRewardApplyService extends IService<IncentiveRewardApply> {
    /**
     * 查询（分页）
     * @author wanghjw
     * @date 2024-09-03 14:08:36
     * @param request QueryRequest
     * @param incentiveRewardApply incentiveRewardApply
     * @return IPage<IncentiveRewardApply>
     */
    IPage<IncentiveRewardApplyDto> findIncentiveRewardApplyPage(QueryRequest request, IncentiveRewardApplyDto incentiveRewardApply);

    /**
     * 查询（所有）
     * @author wanghjw
     * @date 2024-09-03 14:08:36
     * @param incentiveRewardApply incentiveRewardApply
     * @return List<IncentiveRewardApply>
     */
    List<IncentiveRewardApply> findIncentiveRewardApplyList(IncentiveRewardApply incentiveRewardApply);

    /**
    * 根据ID查询
    * @author wanghjw
    * @date 2024-09-03 14:08:36
    * @param id
    * @return IncentiveRewardApply
    */
    IncentiveRewardApplyDto findIncentiveRewardApplyById(String id);

    /**
     * 新增
     * @author wanghjw
     * @date 2024-09-03 14:08:36
     * @param incentiveRewardApply incentiveRewardApply
     */
    void createIncentiveRewardApply(IncentiveRewardApplyDto incentiveRewardApply) throws FebsException;

    /**
     * 修改
     * @author wanghjw
     * @date 2024-09-03 14:08:36
     * @param incentiveRewardApply incentiveRewardApply
     */
    void updateIncentiveRewardApply(IncentiveRewardApplyDto incentiveRewardApply) throws FebsException;

    /**
     * 逻辑删除
     * @author wanghjw
     * @date 2024-09-03 14:08:36
     * @param incentiveRewardApply incentiveRewardApply
     * @param incentiveRewardApplyIds incentiveRewardApplyIds
     */
    void deleteIncentiveRewardApply(IncentiveRewardApply incentiveRewardApply,String incentiveRewardApplyIds);


    /**
    * 物理删除
    * @author wanghjw
    * @date 2024-09-03 14:08:36
    * @param incentiveRewardApplyIds incentiveRewardApplyIds
    */
    void physicallyDeleteIncentiveRewardApply(String incentiveRewardApplyIds);

    /**
     * 生成申请编号
     * @param tenantId
     * @return
     */
    String createIncentiveRewardApplyNo(String tenantId);

    /**
     * 审核
     *
     * @param incentiveRewardApply
     * @param oriStatus            审核前状态
     * @param currentUser
     */
    void auditIncentiveRewardApply(IncentiveRewardApply incentiveRewardApply, String oriStatus, User currentUser) throws FebsException;

    /**
     * 签发
     * @param incentiveRewardApply
     * @param oriStatus 签发前状态
     */
    void issuanceIncentiveRewardApply(IncentiveRewardApply incentiveRewardApply,String oriStatus);


    /**
     * 上传签收文件
     * @param incentiveRewardApply
     * @param incentiveGoodsOrder
     */
    void receiveIncentiveRewardApply(IncentiveRewardApplyDto incentiveRewardApply, IncentiveGoodsOrder incentiveGoodsOrder);
}
